

package com.hazelcast.internal.util.executor;

import com.hazelcast.internal.metrics.Probe;

import java.util.concurrent.ExecutorService;

import static com.hazelcast.internal.metrics.MetricDescriptorConstants.*;
import static com.hazelcast.internal.metrics.ProbeLevel.MANDATORY;

public interface ManagedExecutorService extends ExecutorService {

    String getName();

    @Probe(name = EXECUTOR_METRIC_MANAGED_EXECUTOR_SERVICE_COMPLETED_TASKS)
    long getCompletedTaskCount();

    @Probe(name = EXECUTOR_METRIC_MANAGED_EXECUTOR_SERVICE_MAXIMUM_POOL_SIZE)
    int getMaximumPoolSize();

    @Probe(name = EXECUTOR_METRIC_MANAGED_EXECUTOR_SERVICE_POOL_SIZE)
    int getPoolSize();

    @Probe(name = EXECUTOR_METRIC_MANAGED_EXECUTOR_SERVICE_QUEUE_SIZE, level = MANDATORY)
    int getQueueSize();

    @Probe(name = EXECUTOR_METRIC_MANAGED_EXECUTOR_SERVICE_REMAINING_QUEUE_CAPACITY)
    int getRemainingQueueCapacity();
}
